package site.wlwsjsx.iot_backend.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 实验室基础信息表
 * 对应表：lab_info
 */
@Data
@Getter
@Setter
public class LabInfo {
    private Integer id;                 // 实验室唯一ID
    private String labCode;             // 实验室编号
    private String labName;             // 实验室名称
    private String labLocation;         // 实验室位置
    private Integer maxWorkstation = 30; // 最大工位数量，默认30
    private Integer curStudentNum = 0;   // 当前人数，默认0

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime modifyTime;   // 更新时间

    public LabInfo() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLabName() {
        return labName;
    }

    public void setLabName(String labName) {
        this.labName = labName;
    }

    public String getLabLocation() {
        return labLocation;
    }

    public void setLabLocation(String labLocation) {
        this.labLocation = labLocation;
    }

    public Integer getMaxWorkstation() {
        return maxWorkstation;
    }

    public void setMaxWorkstation(Integer maxWorkstation) {
        this.maxWorkstation = maxWorkstation;
    }

    public Integer getCurStudentNum() {
        return curStudentNum;
    }

    public void setCurStudentNum(Integer curStudentNum) {
        this.curStudentNum = curStudentNum;
    }

    public LocalDateTime getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(LocalDateTime modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getLabCode() {
        return labCode;
    }

    public void setLabCode(String labCode) {
        this.labCode = labCode;
    }

    @Override
    public String toString() {
        return "LabInfo{" +
                "id=" + id +
                ", labCode='" + labCode + '\'' +
                ", labName='" + labName + '\'' +
                ", labLocation='" + labLocation + '\'' +
                ", maxWorkstation=" + maxWorkstation +
                ", curStudentNum=" + curStudentNum +
                ", modifyTime=" + modifyTime +
                '}';
    }
}
